#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <map>
#include <climits>
#include <unordered_map>
using namespace std;

int solve(string s){
    unordered_map<char,int> mp;
    for(auto x:s){
        mp[x]++;
    }
    int ans=0;//最终
    for(auto t:mp){
        int cnt=t.second;
        ans+=cnt/2*2;
        if(cnt&1 && !(ans&1)) ans++;
    }
    return ans;
}

int main(){
    string s;
    cin >> s;
    cout << solve(s)<<endl;



    return 0;
}